<div class="uploads form">
	<?php echo $form->create('Upload', array('type' => 'file')); ?>
	<h1>Upload new file</h1>
	<fieldset>
		<legend><?php __('Add or Edit Upload');?></legend>
		<?php echo $form->input('article_id'); ?>
		<?php echo $form->input('id'); ?>
		<?php echo $form->input('title'); ?>
		<?php echo $form->input('description'); ?>
		<?php 
		if(!empty($this->data['Upload']['id'])) {
			echo $this->renderElement('../uploads/thumb', array("upload" => $this->data));

			$filename = $this->data['Upload']['title'] . "(" . $this->data['Upload']['filesize'] . ")";
			$fullpath = '/' . $this->data['Upload']['dir'] . '/' . $this->data['Upload']['filename'];
		} ?>
		<?php echo $form->input('filename', array('type' => 'file','label' => 'Upload a new file')); ?>
		<div class="block">
			
			
		</div>
		
	</fieldset>
<?php echo $form->end('Submit');?>
</div>
<div class="actions">
	<ul>
		<li><?php echo $html->link(__('List Uploads', true), array('action'=>'index'));?></li>
		<li><?php echo $html->link(__('List Articles', true), array('controller'=> 'articles', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Article', true), array('controller'=> 'articles', 'action'=>'add')); ?> </li>
	</ul>
</div>
